﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Xiaov.SmartWeb.Model;
using Xiaov.SmartWeb.Infrastructure.ExtMethod;
using System.Data;

namespace Xiaov.SmartWeb.Application.PluginSrc.StatisticalSystem.Manage
{
  public partial class ReportStateList : BasePage
  {
    protected void Page_Load(object sender, EventArgs e)
    {
      if (!IsPostBack)
      {
        BindDDL();
        //BindGrid();
      }
    }

    //        private void BindGrid()
    //        {
    //            string sql = @"select t2.bbbm,t2.lrbh,t2.bbmc,t2.bbzq,t2.yqsbsj,null as YSB,null WSB from (
    //select distinct(bbbm) from bbdytbdw t where length(dwbm)=4) t1 , bbbmb t2 where t1.bbbm=t2.bbbm";
    //            DataSet ds = Maticsoft.DBUtility.DbHelperOra.Query(sql);
    //        }

    private void BindDDL()
    {
      int thisyear = DateTime.Now.Year;
      int thismonth = DateTime.Now.Month;
      int preyear = 2013;
      for (int year = preyear; year <= thisyear + 1; year++)
      {
        ddl_Year.Items.Add(year.ToString());
      }
      for (int i = 1; i <= 12; i++)
      {
        ddl_Month.Items.Add(i.ToString());
      }
      ddl_Year.SelectedValue = thisyear.ToString();
      ddl_Month.SelectedValue = (thismonth - 1).ToString();

    }

    protected void ddl_Owner_SelectedIndexChanged(object sender, EventArgs e)
    {
      //BindGrid();
    }

    protected void ddl_Year_SelectedIndexChanged(object sender, EventArgs e)
    {
      //BindGrid();
    }


    protected void ddl_Month_SelectedIndexChanged(object sender, EventArgs e)
    {
      //BindGrid();
    }
  }
}